/**
 * Copyright 2012 Balaji Thennarangam
 */
package com.kathez.util.commonutils;

import com.kathez.repository.IKathezRepository;

/**
 * @author Balaji.T
 * @version 1.0
 * @since 1.0
 *
 */
public abstract class RepositoryLocator {

	public static IKathezRepository locateRepository(String repositoryInterfaceName) {
		try {
			return (IKathezRepository) Class.forName(PropertyLoader.getProperty("repositories", repositoryInterfaceName)).newInstance();
		} catch (InstantiationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

}
